Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement local and global variables handling for wasm simd #4056

Merged

Conversation

Zzzabiyaka
Copy link
Contributor

@Zzzabiyaka Zzzabiyaka commented Jan 27, 2025

note:

I plan a bigger refactoring in a separate PR when we have all the spec tests passing so that I can easily check that there are no regressions from refactoring

@@ -3536,6 +3541,24 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
HANDLE_OP_END();
}

#if WASM_ENABLE_SIMDE != 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't seem right - it makes the assumption about SIMD implementation; if for some platforms there will be another library used to implement SIMD instructions, you'd have to remember to update this place (and the condition will become more and more complicated). We should attempt to refactor the code so the simple and universal condition WASM_ENABLE SIMD != 0 should be sufficient.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comment for all the other similar conditions in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's tackle this separately and out of this PR

addr = GET_OPERAND(uint32, I32, 0); \
frame_ip += 2; \
addr_ret = GET_OFFSET(); \
CHECK_MEMORY_OVERFLOW(4); \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it check the address of the v128 destination? if so, should that be 4 or rather 16?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check this once more

@Zzzabiyaka Zzzabiyaka force-pushed the makslit/local_global branch 3 times, most recently from 5450cae to 36833e4 Compare January 28, 2025 13:49
@Zzzabiyaka Zzzabiyaka force-pushed the makslit/local_global branch 9 times, most recently from cc9b7ae to dbbbd0a Compare January 28, 2025 21:34
if (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR "ARM.*")
add_definitions (-DWASM_ENABLE_SIMDE=1)
endif ()
add_definitions (-DWASM_ENABLE_SIMDE=1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should hopefully be gone after refactoring but keeping it here so far

@Zzzabiyaka Zzzabiyaka force-pushed the makslit/local_global branch from dbbbd0a to 8cae7cc Compare January 30, 2025 00:21
Fix v128 load/store

style
@Zzzabiyaka
Copy link
Contributor Author

Zzzabiyaka commented Feb 12, 2025

@lum1n0us could you help me with fixing the CI failure?

I see

  mkdir log
  cp $PWD/nuttx/.config log/dot-config
  cp  log
  tar -C apps/interpreters/wamr/wamr/tests/wamr-test-suites/workspace -cvzf log/report.tgz report
  shell: sh -e {0}
  env:
    LLVM_CACHE_SUFFIX: build-llvm_libraries_ex
    WASI_SDK_PATH: /opt/wasi-sdk
cp: cannot stat '/__w/wasm-micro-runtime/wasm-micro-runtime/nuttx/.config': No such file or directory

but I didn't really change anything about nuttx configs so not sure what would be my next steps

@Zzzabiyaka
Copy link
Contributor Author

Zzzabiyaka commented Feb 14, 2025

Hi @lum1n0us @TianlongLiang @no1wudi

merging this is important for us to finish off the remaining items for WASM SIMD, could anyone take a look please?

I see #4082 is this going to be related to the failure we're seeing by any chance

Copy link
Collaborator

@loganek loganek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm merging it as this is a PR only to the dev branch; also the build failure is not related to the changes here.

@loganek loganek merged commit 93feee8 into bytecodealliance:dev/simd_for_interp Feb 14, 2025
370 of 383 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants